﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//using Telerik.Web.UI;
using Ext.Net;

namespace DSS.DSS
{
    public partial class Hybrid : System.Web.UI.Page
    {


        //protected void RadGrid2_ItemInserted(object source, GridInsertedEventArgs e)
        //{
        //    if (e.Exception != null)
        //    {
        //        e.ExceptionHandled = true;
        //        NotifyUser("Product cannot be inserted. Reason: " + e.Exception.Message);
        //    }
        //    else
        //    {
        //        NotifyUser("New product is inserted!");
        //    }
        //}








//        private int MaxSetId = 0 ;

//        protected void AddRowClick(object sender, EventArgs e)
//        {
//            var clickedButton = (RadButton)sender;

//            var row = ((DataTable)(Session["ds2"])).NewRow();//_dataTableSets.NewRow();
//            row["Id"] = ++MaxSetId;
//            row["Name"] = radComboBox1.Text;
//            row["Value"] = "";
//                _dataTableSets.Rows.Add(radComboBox1.Text, "");
//            RadGrid2.DataSource = _dataTableSets;
//            RadGrid2.DataBind();
//        }

//        public class SetRecord
//        {
//            public string Pref { get; set; }
//            public string Value { get; set; }
//        }

       // protected void Page_Load(object sender, EventArgs e)
       //{
       //     if (!X.IsAjaxRequest)
       //   //  if(!IsPostBack)
       // {
       //     LoadDataForRadGrids();
      
       // }
       // }

//        private DataTable GetComboSource()
//        {
//            var dt = new DataTable();
//            dt.Columns.Add("Value");

//            dt.Columns.Add("Text");

//            dt.Rows.Add(1, "val1");
//            dt.Rows.Add(2, "val2");
//            return dt;
//        }

      



        /*



            
            const string query = "SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers";


            var adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand(query, con);

            var myDataTable = new DataTable();

            con.Open();
            try
            {
                adapter.Fill(myDataTable);
            }
            finally
            {
                con.Close();
            }
            
            return myDataTable;
        }*/
    }
}